package org.aeon.entity;


import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;

/**
 * @author MissingAeon
 * @email nian0950@qq.com
 * @date 2024-02-24 11:19:05
 */
@Data
@NoArgsConstructor
@ToString(exclude = {"version", "isDel"})
public class UserRelation implements Serializable {

    @Serial
    private static final long serialVersionUID = -6361713334016493677L;
    /**
     * 主键
     */
    private Long id;
    /**
     * 用户（外键）
     */
    private Long userId;
    /**
     * 用户2（外键）
     */
    private Long anotherUserId;
    /**
     * 1 好的，0怀的
     */
    private Boolean isFriend;
    /**
     * 关系开始日期
     */
    private Date startTime;
    /**
     * 版本
     */
    private Integer version;
    /**
     * 逻辑删除
     */
    private Integer isDel;

    public UserRelation(Long userId, Long anotherUserId, Boolean isFriend, Date startTime) {
        this.userId = userId;
        this.anotherUserId = anotherUserId;
        this.isFriend = isFriend;
        this.startTime = startTime;
    }
}
